<?PHP 
    include_once('/libs/bn_path.php');
    header('Content-type: text/xml');
    $post=bn_post::getInstance();
    $conf=bn_config::getInstance();
    $rows=$post->select_allposturl()->orderby('p.id desc')->limit(10)->fetchOBJ();
    //CONSTRUCT RSS FEED HEADERS
    $output="<rss version='2.0'>
             <channel>";
    //BODY OF RSS FEED
    if(isset($rows))
    {
        foreach($rows as $row)
        {
          $text=strip_tags($row->text);
          $text=str_replace(array('&zwnj;','&nbsp;','&times;'),array('','',''),$text);
          $output .= "\n<item>";
          $output .= "\n\t<title>$row->title</title>";
          $output .= "\n\t<description>
                          $text
                          </description>";
          $output .= "\n\t<link>$row->url</link>";
          $output .= "\n\t<pubDate>$row->date</pubDate>";
          $output .= "\n</item>";              
        }
    }
    //CLOSE RSS FEED
   $output .= '</channel>
   </rss>';
    //SEND COMPLETE RSS FEED TO BROWSER
    echo($output);
 
?>